package com.browan.constellation.data;

import android.database.Cursor;

public class RSSData extends BaseColumn
{
	private int m_Id;
	private String m_Title;
	private String m_Link;
	private String m_Category;
	private String m_PubDate;
	private String m_Description;
	private int m_Save = 0;
	private String m_Uptime;
	
	public static String CURRENT_RSS_UPTIME; 

	public RSSData()
	{
		m_Title = "";
		m_Description = "";
	}

	public RSSData(Cursor cursor){
		
		m_Id = cursor.getInt(cursor.getColumnIndexOrThrow(_ID));
		
		m_Title = cursor.getString(cursor.getColumnIndexOrThrow(ITEM_TITLE));
		
		m_Description = cursor.getString(cursor.getColumnIndexOrThrow(ITEM_DESC));
		
		m_Link = cursor.getString(cursor.getColumnIndexOrThrow(ITEM_LINK));
		
		m_Uptime = cursor.getString(cursor.getColumnIndexOrThrow(ITEM_UPDATE_TIME));
		
		m_Category = cursor.getString(cursor.getColumnIndexOrThrow(ITEM_CATEGORY));
		
		m_PubDate = cursor.getString(cursor.getColumnIndexOrThrow(ITEM_PUBDATE));
	
		m_Save = cursor.getInt(cursor.getColumnIndexOrThrow(ITEM_ISSAVE));
	}
	
	public int getId()
	{
		return m_Id;
	}

	public void setId(int id)
	{
		m_Id = id;
	}

	public String getTitle()
	{
		return m_Title;
	}

	public void setTitle(String title)
	{
		m_Title = title;
	}

	public String getLink()
	{
		return m_Link;
	}

	public void setLink(String link)
	{
		m_Link = link;
	}

	public String getCategory()
	{
		return m_Category;
	}

	public void setCategory(String category)
	{
		m_Category = category;
	}

	public String getPubDate()
	{
		return m_PubDate;
	}

	public void setPubDate(String pubDate)
	{
		m_PubDate = pubDate;
	}

	public String getDescription()
	{
		return m_Description;
	}

	public void setDescription(String description)
	{
		m_Description = description;
	}

	public int getSave()
	{
		return m_Save;
	}

	public void setSave(int save)
	{
		m_Save = save;
	}

	@Override
	public String toString()
	{

		return this.m_Title + "\n" + this.m_Description + "\n" + this.m_PubDate;
	}

	public String getUptime()
	{
		return m_Uptime;
	}

	public void setUptime(String uptime)
	{
		m_Uptime = uptime;
	}
}